Skip to content

[spam]#3803

Closed
Dargon789 wants to merge 5 commits intonvm-sh:masterfrom
Dargon789:nvm-sh
Closed

[spam]#3803
Dargon789 wants to merge 5 commits intonvm-sh:masterfrom
Dargon789:nvm-sh

Conversation

@Dargon789
Copy link
Copy Markdown





ljharb and others added 5 commits March 12, 2026 15:32
Add `try` and `try_err` helper functions to `test/common.sh` that capture stdout/stderr and exit code from a single invocation, eliminating duplicate command executions in tests.
Convert all existing tests that used the `OUTPUT`/`EXIT_CODE` double-invocation pattern to use the new helpers.
Also fixes a pre-existing bug in the `nvm_die_on_prefix` test where ASCII apostrophes were used instead of U+2019 to match nvm.sh output.
Add `--offline` flag to `nvm install` that resolves versions using only locally installed versions and cached downloads. No network calls are made.

New helper functions `nvm_ls_cached` and `nvm_offline_version` scan `$NVM_DIR/.cache/bin/` for previously downloaded tarballs.
In offline mode, `nvm_download_artifact` returns cached tarballs directly without checksum verification or download attempts.
The curl/wget requirement is skipped when `--offline` is set.
Supports `--lts` via locally stored LTS alias files.
Colors were lost because `nvm_has_colors` checks `[ -t 1 ]`, which is false inside the `(...) | sort` pipeline in `nvm_list_aliases`.
Evaluate `nvm_has_colors` before the pipe and propagate via `NVM_HAS_COLORS`, matching the approach used by `nvm_print_versions`.

Bug introduced in 6311a0e.
* Add .circleci/config.yml (#1)

* fix:[meta] update security policy; add IRP (#3)

* [Fix] `nvm_install_latest_npm`: fix node version detection

* v0.40.3

* [meta] update security policy; add IRP

---------

Co-authored-by: Toni Viemerö <toni.viemero@iki.fi>
Co-authored-by: Jordan Harband <ljharb@gmail.com>

* Potential fix for code scanning alert no. 2: Workflow does not contain permissions (#7)

Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 2: Workflow does not contain permissions (#7)

Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Delete .circleci directory (#13)

Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>

* Alert autofix 1 (#15)

* Delete .circleci directory

Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>

* Circleci project setup (#14)

* Add .circleci/config.yml

* Add .circleci/config.yml

* Update config.yml (#18)

Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>

---------

Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>

* Circleci project setup (#24)

* Add .circleci/config.yml

* Add .circleci/config.yml

* Update config.yml (#18)

Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>

---------

Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>

---------

Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Co-authored-by: Toni Viemerö <toni.viemero@iki.fi>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@ljharb ljharb changed the title add ci #1 swap fix:[meta] update security policy; add IRP (#3) (#27) [spam] Mar 24, 2026
@ljharb ljharb added the non-issue / invalid This isn't relevant to nvm, or turned out to be something unrelated. label Mar 24, 2026
@ljharb ljharb marked this pull request as draft March 24, 2026 20:41
@ljharb ljharb closed this Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

non-issue / invalid This isn't relevant to nvm, or turned out to be something unrelated.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants